<template>
  <!-- 首页 -->
  <div class="home">
    <div class="footer">
      <el-alert
        title="系统基本信息"
        type="error"
        :closable="false"
        effect="dark"
        center
      >
      </el-alert>
      <el-table
        class="partition"
        border
        :show-header="false"
        :data="system"
        style="width: 100%"
      >
        <el-table-column prop="label1" width="100"> </el-table-column>
        <el-table-column prop="value1"> </el-table-column>
        <el-table-column prop="label2" width="100"> </el-table-column>
        <el-table-column prop="value2"> </el-table-column>
      </el-table>
      <el-alert
        title="共享单车管理系统"
        type="success"
        :closable="false"
        effect="dark"
        center
      >
      </el-alert>
      <el-table
        border
        :show-header="false"
        :data="tableData"
        style="width: 100%"
      >
        <el-table-column prop="label"> </el-table-column>
        <el-table-column prop="name"> </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
export default {
  name: "Headers",
  data() {
    return {
      tableData: [
        {
          label: "系统作者",
          name: "曹智鹏",
        },
        {
          label: "指导老师",
          name: "高艳",
        },
        {
          label: "联系方式",
          name: "12345",
        },
      ],
      system: [
        {
          label1: "当前用户",
          value1: this.$store.getters.user.name,
          label2: "您的权限",
          value2:
            this.$store.getters.user.grade >= 999 ? "超级管理员" : "普通用户",
        },
        {
          label1: "当前日期",
          value1: Date(),
          label2: "开发日期",
          value2: "2020-04-18",
        },
        {
          label1: "浏览器版本",
          value1: navigator.userAgent,
          label2: "操作系统",
          value2: navigator.platform,
        },
      ],
    };
  },
  computed: {
    user() {
      return this.$store.getters.user;
    },
  },
  methods: {
    setDialogInfo(cmdItem) {
      switch (cmdItem) {
        case "a":
          this.logout();
          break;
      }
    },
  },
};
</script>
<style scoped>
.home {
  width: 100%;
  height: 100%;
}
.container {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding-top: 100px;
  background-color: rgba(0, 0, 0, 0.7);
  text-align: center;
  color: white;
}
.title {
  font-size: 30px;
}
.lead {
  margin-top: 50px;
  font-size: 22px;
}
.partition {
  margin-bottom: 100px;
}
</style>
